% File: testbench_sc_fde_ib_snr_evolution.m
% -----------------------------------------
% This script test SNR evolutional characteristic of baseline ib-dfe.

%  clear all
%  close all

% % dbstop in sc_fde_ib at 8
% dbstop in sc_fde_ib_snr_evolution at 46
% 
% chan_profile    = 0;
% mu_profile      = 0;
% sig_pac_profile = 0;
% code_profile    = 0;
% sim_profile     = 3;
% scrambl_profile = 0;
% intlv_profile   = 0;
% sc_fde_preprocess
% 
% rx_profile = 6;
% sc_fde_base
% 
% sc_fde_postprocess

% dbstop sc_fde_ib_snr_evolution at 46

%  load 28-1.mat

 var_tmp   = 1e-8*(1: 1e4: 1e8);  % normalized var.
%var_tmp = [1 0.00913805 0.0000787231 0.000030195 0.0000299917]; % evolution for QPSK @ 12dB
sc_fde_ib_snr_evolution

figure();
semilogx(var_tmp, sinr_tmp,'LineWidth',2);
set(gca,'XDir','reverse')
xlabel('Average Variance'); ylabel('SNR');
grid on
legend('Transfer Function of Equalizer', 'Location', 'SouthEast');
title('SNR Evolution Chart');

% figure();
% semilogx(var_tmp, mse_tmp);
% set(gca,'XDir','reverse')
% xlabel('Average Variance'); ylabel('MSE');
% grid on
% legend('Transfer Function of Equalizer', 'Location', 'NorthEast');
% title('MSE Evolution Chart');

% End of script